%give each transition between copy numbers a unique code ex 1->3 = 3, 3->5 = 19
%ex if max copy num = 6 (3-1*6+1 + 5 = 2*7 + 5 = 19)
function [ from, to ] = getTransitionFromCode(code)
    maxcopynum = 1000;
    if (code == 0)
        from = 0;
        to = 0;
    else
        to = mod(code, maxcopynum);
        from = (code - to) / maxcopynum;
    end
end
